{php}
    $path_type = isset($field['options']['path_type'])? $field['options']['path_type']:'picture';
{/php}

<div class="controls picture">
    <div class="col-md-9" style="padding-bottom: 5px;">

    <input id="{$field.id}" class="attach" name="{$field.name}" type="hidden" value="{$field.value}" event-node="uploadinput">
    <div class="upload-img-box tc popup-gallery img-thumbnail pr">
        <div class="each">
            {empty name="field.value"}
                <img src="{php}echo get_image(0);{/php}">
            {else /}
                <i onclick="admin_image.removeImage($(this),'{$field.value}')" class="fa fa-times-circle remove-attachment"></i> 
                <a href="{$field.value|get_image}" title="点击查看大图">
                    <img src="{$field.value|get_image}">
                </a>
               
            {/empty}
        </div>

    </div>
    <div>
      <span class="btn btn-info ml-10 mt-10 btn-sm" data-url="{:url('admin/Upload/attachmentLayer',['input_id_name'=>$field['id'],'path_type'=>$path_type,'gettype'=>'single'])}" data-gettype="single" onclick="openAttachmentLayer(this);"><i class="fa fa-file-image-o"></i> 选择图片</span>
    </div>
</div>
</div>